package day05;

import java.util.Scanner;

public class homework1_2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int score=0;
        int sum=0;
        for(int t=1;t<=10;t++)
        {
            int a =(int)(Math.random()*100+1);
            int b = (int)(Math.random()*100+1);
            System.out.println(a+ "+" +b+"=?");
            sum = a+b;
            int result = scanner.nextInt();
            if(result == sum )
            {
                System.out.println("恭喜你答对了！");
                score+=10;
            }
            else{
                System.out.println("答错了");
            }
        }
        System.out.println("您的成绩为："+score);
        if(score<60){
            System.out.println("不及格");
        }
    }
}
